<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>obj</title>
	</head>
	<script src="./three.js"></script>
	<script src="three_r102/examples/jsm/loaders/GLTFLoader.js"></script>
	
	<body>
		<script>
			var scene =new THREE.Scene();
			var loader=new THREE.GLTFLoader();
			var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 200); //实例化相机
			camera.position.set(0, 0, 15);
 
			loader.load( "geo/g.glb", gltf=>{
				console.log(gltf);
				scene.add(gltf.scene);
			}) 
			renderer = new THREE.WebGLRenderer(); //实例化渲染器
			renderer.setSize(window.innerWidth, window.innerHeight); //设置宽和高        
			document.body.appendChild(renderer.domElement); //添加到dom   
			renderer.render( scene, camera ); 
		</script>
	</body>
</html>
